home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / MosaicSRC / libwww2 / HTStream.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  1.6 KB  |  57 lines

  1. /*                                                      The Stream class definition -- libwww
  2.                                  STREAM OBJECT DEFINITION
  3.                                              
  4.    A Stream object is something which accepts a stream of text.
  5.    
  6.    The creation methods will vary on the type of Stream Object, but
  7.    the methods used to write to it and close it are common.
  8.    
  9.  */
  10. #ifndef HTSTREAM_H
  11. #define HTSTREAM_H
  12.  
  13. #include "HTUtils.h"
  14.  
  15. typedef struct _HTStream HTStream;
  16.  
  17. /*
  18.  
  19.    These are the common methods of all streams.  They should be
  20.    self-explanatory, except for end_document which must be called
  21.    before free.  It should be merged with free in fact: it should be
  22.    dummy for new streams.
  23.    
  24.    The put_block method was write, but this upset systems whiuch had
  25.    macros for write().
  26.    
  27.  */
  28. typedef struct _HTStreamClass {
  29.  
  30.         char*  name;                            /* Just for diagnostics */
  31.                 
  32.         void (*free) PARAMS((
  33.                 HTStream*       me));
  34.  
  35.         void (*end_document) PARAMS((
  36.                 HTStream*       me));
  37.                 
  38.         void (*put_character) PARAMS((
  39.                 HTStream*       me,
  40.                 char            ch));
  41.                                 
  42.         void (*put_string) PARAMS((
  43.                 HTStream*       me,
  44.                 char *    str));
  45.                 
  46.         void (*put_block) PARAMS((
  47.                 HTStream*       me,
  48.                 char *    str,
  49.                 int             len));
  50.                 
  51.         void (*handle_interrupt) PARAMS((
  52.                 HTStream*       me));
  53.                 
  54. }HTStreamClass;
  55.  
  56. #endif /* HTSTREAM_H */
  57.